/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.caresms.service.persistence;

import com.caresms.model.Sms_Master;

import com.liferay.portal.service.persistence.BasePersistence;

/**
 * The persistence interface for the sms_ master service.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author cc
 * @see Sms_MasterPersistenceImpl
 * @see Sms_MasterUtil
 * @generated
 */
public interface Sms_MasterPersistence extends BasePersistence<Sms_Master> {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this interface directly. Always use {@link Sms_MasterUtil} to access the sms_ master persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
	 */

	/**
	* Caches the sms_ master in the entity cache if it is enabled.
	*
	* @param sms_Master the sms_ master
	*/
	public void cacheResult(com.caresms.model.Sms_Master sms_Master);

	/**
	* Caches the sms_ masters in the entity cache if it is enabled.
	*
	* @param sms_Masters the sms_ masters
	*/
	public void cacheResult(
		java.util.List<com.caresms.model.Sms_Master> sms_Masters);

	/**
	* Creates a new sms_ master with the primary key. Does not add the sms_ master to the database.
	*
	* @param SmsId the primary key for the new sms_ master
	* @return the new sms_ master
	*/
	public com.caresms.model.Sms_Master create(long SmsId);

	/**
	* Removes the sms_ master with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param SmsId the primary key of the sms_ master
	* @return the sms_ master that was removed
	* @throws com.caresms.NoSuchSms_MasterException if a sms_ master with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master remove(long SmsId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	public com.caresms.model.Sms_Master updateImpl(
		com.caresms.model.Sms_Master sms_Master, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master with the primary key or throws a {@link com.caresms.NoSuchSms_MasterException} if it could not be found.
	*
	* @param SmsId the primary key of the sms_ master
	* @return the sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a sms_ master with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master findByPrimaryKey(long SmsId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param SmsId the primary key of the sms_ master
	* @return the sms_ master, or <code>null</code> if a sms_ master with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master fetchByPrimaryKey(long SmsId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where Sms_chars_Size = &#63; and userId = &#63; or throws a {@link com.caresms.NoSuchSms_MasterException} if it could not be found.
	*
	* @param Sms_chars_Size the sms_chars_ size
	* @param userId the user ID
	* @return the matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master findByFindSmsBycharsSize_User_Id(
		int Sms_chars_Size, long userId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where Sms_chars_Size = &#63; and userId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param Sms_chars_Size the sms_chars_ size
	* @param userId the user ID
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master fetchByFindSmsBycharsSize_User_Id(
		int Sms_chars_Size, long userId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where Sms_chars_Size = &#63; and userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param Sms_chars_Size the sms_chars_ size
	* @param userId the user ID
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master fetchByFindSmsBycharsSize_User_Id(
		int Sms_chars_Size, long userId, boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where userId = &#63; or throws a {@link com.caresms.NoSuchSms_MasterException} if it could not be found.
	*
	* @param userId the user ID
	* @return the matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master findByFindSmsByUser_Id(long userId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where userId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param userId the user ID
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master fetchByFindSmsByUser_Id(long userId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where userId = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param userId the user ID
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master fetchByFindSmsByUser_Id(long userId,
		boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where isActive = &#63; or throws a {@link com.caresms.NoSuchSms_MasterException} if it could not be found.
	*
	* @param isActive the is active
	* @return the matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master findByFindSmsByIsActive(
		boolean isActive)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where isActive = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param isActive the is active
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master fetchByFindSmsByIsActive(
		boolean isActive)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where isActive = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param isActive the is active
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master fetchByFindSmsByIsActive(
		boolean isActive, boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where Approved_By = &#63; or throws a {@link com.caresms.NoSuchSms_MasterException} if it could not be found.
	*
	* @param Approved_By the approved_ by
	* @return the matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master findByFindSmsByApproved_By(
		long Approved_By)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where Approved_By = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
	*
	* @param Approved_By the approved_ by
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master fetchByFindSmsByApproved_By(
		long Approved_By)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ master where Approved_By = &#63; or returns <code>null</code> if it could not be found, optionally using the finder cache.
	*
	* @param Approved_By the approved_ by
	* @param retrieveFromCache whether to use the finder cache
	* @return the matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master fetchByFindSmsByApproved_By(
		long Approved_By, boolean retrieveFromCache)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the sms_ masters where field2 = &#63;.
	*
	* @param field2 the field2
	* @return the matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.caresms.model.Sms_Master> findByField2(
		boolean field2)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the sms_ masters where field2 = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param field2 the field2
	* @param start the lower bound of the range of sms_ masters
	* @param end the upper bound of the range of sms_ masters (not inclusive)
	* @return the range of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.caresms.model.Sms_Master> findByField2(
		boolean field2, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the sms_ masters where field2 = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param field2 the field2
	* @param start the lower bound of the range of sms_ masters
	* @param end the upper bound of the range of sms_ masters (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.caresms.model.Sms_Master> findByField2(
		boolean field2, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first sms_ master in the ordered set where field2 = &#63;.
	*
	* @param field2 the field2
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master findByField2_First(boolean field2,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first sms_ master in the ordered set where field2 = &#63;.
	*
	* @param field2 the field2
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master fetchByField2_First(boolean field2,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last sms_ master in the ordered set where field2 = &#63;.
	*
	* @param field2 the field2
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master findByField2_Last(boolean field2,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last sms_ master in the ordered set where field2 = &#63;.
	*
	* @param field2 the field2
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching sms_ master, or <code>null</code> if a matching sms_ master could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master fetchByField2_Last(boolean field2,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the sms_ masters before and after the current sms_ master in the ordered set where field2 = &#63;.
	*
	* @param SmsId the primary key of the current sms_ master
	* @param field2 the field2
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next sms_ master
	* @throws com.caresms.NoSuchSms_MasterException if a sms_ master with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master[] findByField2_PrevAndNext(long SmsId,
		boolean field2,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the sms_ masters.
	*
	* @return the sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.caresms.model.Sms_Master> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the sms_ masters.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of sms_ masters
	* @param end the upper bound of the range of sms_ masters (not inclusive)
	* @return the range of sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.caresms.model.Sms_Master> findAll(int start,
		int end) throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the sms_ masters.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of sms_ masters
	* @param end the upper bound of the range of sms_ masters (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.caresms.model.Sms_Master> findAll(int start,
		int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes the sms_ master where Sms_chars_Size = &#63; and userId = &#63; from the database.
	*
	* @param Sms_chars_Size the sms_chars_ size
	* @param userId the user ID
	* @return the sms_ master that was removed
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master removeByFindSmsBycharsSize_User_Id(
		int Sms_chars_Size, long userId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes the sms_ master where userId = &#63; from the database.
	*
	* @param userId the user ID
	* @return the sms_ master that was removed
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master removeByFindSmsByUser_Id(long userId)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes the sms_ master where isActive = &#63; from the database.
	*
	* @param isActive the is active
	* @return the sms_ master that was removed
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master removeByFindSmsByIsActive(
		boolean isActive)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes the sms_ master where Approved_By = &#63; from the database.
	*
	* @param Approved_By the approved_ by
	* @return the sms_ master that was removed
	* @throws SystemException if a system exception occurred
	*/
	public com.caresms.model.Sms_Master removeByFindSmsByApproved_By(
		long Approved_By)
		throws com.caresms.NoSuchSms_MasterException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the sms_ masters where field2 = &#63; from the database.
	*
	* @param field2 the field2
	* @throws SystemException if a system exception occurred
	*/
	public void removeByField2(boolean field2)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the sms_ masters from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of sms_ masters where Sms_chars_Size = &#63; and userId = &#63;.
	*
	* @param Sms_chars_Size the sms_chars_ size
	* @param userId the user ID
	* @return the number of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public int countByFindSmsBycharsSize_User_Id(int Sms_chars_Size, long userId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of sms_ masters where userId = &#63;.
	*
	* @param userId the user ID
	* @return the number of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public int countByFindSmsByUser_Id(long userId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of sms_ masters where isActive = &#63;.
	*
	* @param isActive the is active
	* @return the number of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public int countByFindSmsByIsActive(boolean isActive)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of sms_ masters where Approved_By = &#63;.
	*
	* @param Approved_By the approved_ by
	* @return the number of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public int countByFindSmsByApproved_By(long Approved_By)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of sms_ masters where field2 = &#63;.
	*
	* @param field2 the field2
	* @return the number of matching sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public int countByField2(boolean field2)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of sms_ masters.
	*
	* @return the number of sms_ masters
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;
}